package com.pearlsoft.webapp.core.dataset;

import java.util.HashMap;
import java.util.Map;

/**
 * 
 * Field
 * 
 * @Creator haitingr
 * @Create-DateTime 2011-10-24
 */
public class Field {

	private String name;

	private String type;

	private int length;

	public Field(String name, String type, int length) {
		this.name = name;
		this.type = type;
		this.length = length;
	}

	public String getName() {
		return name;
	}

	public String getType() {
		return type;
	}

	public int getLength() {
		return length;
	}

	public Map<String, Object> toMap() {
		Map<String, Object> values = new HashMap<String, Object>();
		values.put("name", name);
		values.put("type", type);
		values.put("length", length);
		return values;
	}

}
